package com.sunday.fangdaifu.widgets;

import android.graphics.Color;
import android.graphics.Path;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;

import com.sunday.fangdaifu.R;

/**
 * 2017/6/30 16:05
 * Created by FREECSDN on 2017/6/30.
 */

public class MenuItem {

    private String mMenuID;
    private Drawable mIcon;
    private String mText;
    private String mLogo;
    private int mBackgroundColor;
    private int mMenuNormalColor;
    private int mMenuSelectedColor;
    private int mTextColor;
    private Path mPath;
    private RectF mBounds;
    private OnMenuItemClickListener onMenuItemClickListener;

    public interface OnMenuItemClickListener {
        public void onMenuItemPressed();
    }

    /**
     * @param mIcon
     * @param mText
     */
    public MenuItem(String id, Drawable mIcon,String logo, String mText,int backgroundColor) {
        super();
        this.mMenuID = id;
        this.mIcon = mIcon;
        this.mText = mText;
        this.mLogo = logo;
        this.mMenuNormalColor = backgroundColor;
        this.mMenuSelectedColor = R.color._63b1ff;
        this.mBackgroundColor = backgroundColor;
        this.mTextColor = R.color._808080;
        mPath = new Path();
        mBounds = new RectF();
    }

    public String getmLogo() {
        return mLogo;
    }

    public void setmLogo(String mLogo) {
        this.mLogo = mLogo;
    }

    /**
     * @return the mTextColor
     */
    public int getTextColor() {
        return mTextColor;
    }

    /**
     * @param mTextColor the mTextColor to set
     */
    public void setTextColor(int mTextColor) {
        this.mTextColor = mTextColor;
    }

    /**
     * @return the mMenuID
     */
    public String getMenuID() {
        return mMenuID;
    }


    /**
     * @return the mBounds
     */
    public Path getMenuPath() {
        return mPath;
    }

    /**
     * @return the mBounds
     */
    public RectF getBounds() {
        return mBounds;
    }

    /**
     * @param
     */
    public void setMenuPath(Path path) {
        mPath = path;
        mPath.computeBounds(mBounds, true);
    }


    /**
     * @return the mIcon
     */
    public Drawable getIcon() {
        return mIcon;
    }

    /**
     * @return the mText
     */
    public String getText() {
        return mText;
    }

    public OnMenuItemClickListener getOnMenuItemClickListener() {
        return onMenuItemClickListener;
    }

    public void setOnMenuItemClickListener(OnMenuItemClickListener onMenuItemClickListener) {
        this.onMenuItemClickListener = onMenuItemClickListener;
    }

    /**
     * @return the mColor
     */
    public int getBackgroundColor() {
        return mBackgroundColor;
    }

    public void setBackgroundColor(int color) {
        this.mBackgroundColor = color;
    }

    /**
     * @return the mMenuNormalColor
     */
    public int getMenuNormalColor() {
        return mMenuNormalColor;
    }

    /**
     * @param mMenuNormalColor the mMenuNormalColor to set
     */
    public void setMenuNormalColor(int mMenuNormalColor) {
        this.mMenuNormalColor = mMenuNormalColor;
    }

    /**
     * @return the mMenuSelectedColor
     */
    public int getMenuSelectedColor() {
        return mMenuSelectedColor;
    }

    /**
     * @param mMenuSelectedColor the mMenuSelectedColor to set
     */
    public void setMenuSelectedColor(int mMenuSelectedColor) {
        this.mMenuSelectedColor = mMenuSelectedColor;
    }
}

